Skip to content

feat(app): start the Assistant minimized on desktop (0289) - #445

Merged
crs48 merged 3 commits into
mainfrom
claude/assistant-minimized-desktop-pr-83413e
Jul 10, 2026
Merged

feat(app): start the Assistant minimized on desktop (0289)#445
crs48 merged 3 commits into
mainfrom
claude/assistant-minimized-desktop-pr-83413e

Conversation

@crs48

@crs48 crs48 commented Jul 10, 2026

Copy link
Copy Markdown
Owner

What

The floating Assistant island opened over the editor on every desktop load. It now starts minimized — collapsed to its reopener pill — so the workspace is clear at rest. The full island is one click away via the pill.

Why

The Assistant claiming editor space at launch is intrusive when the user hasn't asked for it. Starting minimized keeps the surface calm while leaving the assistant a single click away.

How

  • apps/web/src/workbench/state.ts: floatAi default flipped true → false.
    • floatAi is desktop-onlyMobileShell doesn't render FloatingDock, so there's zero mobile impact.
    • floatAi is non-persisted (excluded from the store's partialize), so the default is authoritative every session.
    • When floatAi === false, FloatingDock already renders the "Open assistant" reopener pill instead of <Assistant /> — no other wiring needed.
  • Adds floating-assistant-default.test.ts guarding the minimized default.
  • Adds a changelog fragment (app, ai).

Verification

  • New default test + existing surfaces.test.ts pass.
  • Full vitest run passes (0 failures) — an earlier local pre-push run had flaky failures in the hub concurrent-load smoke test and devkit git timing tests, unrelated to this change; a clean re-run was green.
  • Browser preview couldn't reach the workbench in headless (SQLite/OPFS boot hits the 25s timeout in headless Chrome — a known environment limit), so behavior is verified via the code path + store-default test.

🤖 Generated with Claude Code

The floating Assistant island opened over the editor on every desktop
load. `floatAi` defaults to false so it starts collapsed to its reopener
pill — the workspace is clear at rest and the full island is one click
away. `floatAi` is desktop-only (MobileShell ignores it) and non-persisted,
so the default is authoritative each session.

Adds a regression test guarding the minimized default and a changelog
fragment for the user-facing change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: xNet Test <test@xnet.dev>
@crs48
crs48 force-pushed the claude/assistant-minimized-desktop-pr-83413e branch from df841b5 to 094eabd Compare July 10, 2026 13:50
@crs48
crs48 temporarily deployed to pr-445 July 10, 2026 13:50 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

🖼️ UI changes in this PR

Screens

✏️ Home _(SSIM 0.967)_
before after diff
before after diff

Auto-captured by CI · run. Informational — not a blocking check.

github-actions Bot added a commit that referenced this pull request Jul 10, 2026
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #445.

github-actions Bot added a commit that referenced this pull request Jul 10, 2026
@crs48
crs48 temporarily deployed to pr-445 July 10, 2026 14:03 — with GitHub Actions Inactive
github-actions Bot added a commit that referenced this pull request Jul 10, 2026
github-actions Bot added a commit that referenced this pull request Jul 10, 2026
@crs48
crs48 temporarily deployed to pr-445 July 10, 2026 14:12 — with GitHub Actions Inactive
github-actions Bot added a commit that referenced this pull request Jul 10, 2026
github-actions Bot added a commit that referenced this pull request Jul 10, 2026
@crs48
crs48 merged commit 35f75af into main Jul 10, 2026
15 checks passed
@crs48
crs48 deleted the claude/assistant-minimized-desktop-pr-83413e branch July 10, 2026 14:22
github-actions Bot added a commit that referenced this pull request Jul 10, 2026
crs48 added a commit that referenced this pull request Jul 10, 2026
## What

`@xnetjs/devkit`'s `NodeCommandRunner` now scrubs git's repo-location
environment variables (`GIT_DIR`, `GIT_WORK_TREE`, `GIT_INDEX_FILE`, and
friends) for `git` invocations, so the explicit `cwd` is always
authoritative. An explicit `options.env` entry still wins.

## Why

`RunOptions.cwd` is required precisely so a caller "can never
accidentally run in `process.cwd()`" — but git reads
`GIT_DIR`/`GIT_WORK_TREE`/`GIT_INDEX_FILE` from the environment **over**
`cwd`. A husky hook (`pre-commit`/`pre-push`) exports exactly those vars
pointing at the hook's repo. So when the pre-push hook runs `pnpm test`,
devkit's real-repo tests (`git.test.ts`) spawned `git` children that
inherited the hook's `GIT_DIR` and operated on the **actual worktree**
instead of their temp repo — running `git config`, `git commit`, and
even `git push` against it.

This was not hypothetical: it clobbered a live worktree and its remote
branch during PR #445 (and recurred on #444) — the worktree's
`user.name`/`email` got overwritten and junk `initial`/`checkpoint`
commits were pushed to origin.

## How

- `command-runner.ts`: for `command === 'git'`, merge `{ ...process.env,
...<git-location vars set to undefined>, ...options.env }`. Node's
`spawn` omits `undefined`-valued env keys, so the inherited leak is
dropped while any explicit override is preserved. The scrubbed set is
documented in the new `GIT_LOCATION_ENV` (module-internal — not added to
the package barrel, so no public API change → **patch**).

## Tests

- `command-runner.test.ts`: with a leaked bogus `GIT_DIR`, `git
rev-parse --is-inside-work-tree` still resolves the `cwd` repo (would be
fatal without the scrub); and an explicit `options.env` `GIT_DIR` still
wins.
- `git.test.ts`: a `checkpoint()` lands in `cwd` while `GIT_*` points at
a decoy, and the decoy never becomes a repo.
- Ran the two devkit test files directly (13 passing). Did **not** run
the full suite locally, to avoid re-triggering the very leak this fixes
on an unpatched checkout.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant